前端analysis | 3w & 1h

《Hexo》- introduction

2020-01-08

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

install node

1
2
3
4
5
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash 

// or
brew install nvm

install hexo

1
npm install hexo-cli -g 

validate

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$ hexo -v
hexo: 4.2.0
hexo-cli: 3.1.0
os: Darwin 19.3.0 darwin x64
http_parser: 2.9.3
node: 10.19.0
v8: 6.8.275.32-node.55
uv: 1.28.0
zlib: 1.2.11
brotli: 1.0.7
ares: 1.15.0
modules: 64
nghttp2: 1.39.2
napi: 5
openssl: 1.1.1d
icu: 64.2
unicode: 12.1
cldr: 35.1
tz: 2019c

show hello world

init project

1
$ hexo init hexo-demo

run server

1
$ hexo server

More info: Server
Visit url at http://localhost:4000

Deploy to GitHub

create a new post

1
$ hexo new "My New Post"

Can we config the default post at _config.yml.

1
default_layout: post

More info: Writing

Generate static files

1
$ hexo generate

hexo generate can simple as hexo g

More info: Generating

config GitHub yourname.github.io

config deploy repository

1
2
deploy:
type: ''

Deploy to remote sites

1
$ hexo deploy

hexo deploy can simple as hexo d

More info: Deployment

Tags: Hex
使用支付宝打赏
使用微信打赏

若你觉得我的文章对你有帮助,欢迎点击上方按钮对我打赏